# list1 = [1,2,1,3,5,5]
# list2 = []
# for i in list1:
#     if i not in list2:
#         list2.append(i)
# print(list2)
#
# list1 = []
# with open('text.txt', 'r', encoding='utf8') as f:
#     for i in f.readlines():
#         list2 = i.split(',')
#         tu = tuple([int(j.strip()) for j in list2])
#         list1.append(tu)
#     print(list1)
#
# with open("text.txt") as f:
#     print([tuple([int(j.strip()) for j in i.split(",")]) for i in f.readlines()])

import requests
import time
import re
import uuid

url_page="https://mm.enterdesk.com/dongmanmeinv/"
ret = requests.get(url=url_page)
# print(ret.text)
url_lst = re.findall(r'https://up.enterdesk.com/edpic_360_360/.*?\.jpg', ret.text)
# content = res.content
# with open('./xxx.jpg','wb') as f:
#     f.write(content)

for url in url_lst:
    res = requests.get(url=url)
    time.sleep(3)
    content = res.content
    name = str(uuid.uuid1())+".jpg"
    with open(name,'wb') as f:
        print("正在下载%s"%name)
        f.write(content)